import request from '@/utils/request'

/**
 *
 * @param {*} query
 * @desc 权限管理
 */
export const getProjectList = query => {
  return request({
    url:'/oa/supplier/project_list',
    method: 'get',
    params: query
  })
}

export const addOrder = data =>{
  return request({
    url:'/oa/supplier/add_order',
    method: 'post',
    data
  })
}

/**
 * @desc 获取订单详情
 * @param query
 */
export const getOrderDetail = query => {
  return request({
    url:'/oa/supplier/order_detail',
    method: 'get',
    params: query
  })
}


/**
 * @desc 获取订单列表
 * @param query
 */
export const getOrderList = query => {
  return request({
    url:'/oa/supplier/order_list',
    method: 'get',
    params: query
  })
}


//编辑物料
export const editMatter = data =>{
  return request({
    url:'/oa/matter/matterEdit',
    method: 'post',
    data
  })
}

/**
 * @desc 我的竞价
 * @param query
 */
export const getMypriceList = query => {
  return request({
    url:'/oa/matter/my_price_list',
    method: 'get',
    params: query
  })
}

/**
 * @desc 竞价结果
 * @param query
 */
export const getMyPriceResult = query => {
  return request({
    url:'/oa/matter/my_price_result',
    method: 'get',
    params: query
  })
}


/**
 * @desc 通过xmid获取订单
 * @param query
 */
export const getOrderByXmid = query => {
  return request({
    url:'/oa/supplier/get_order_by_xmid',
    method: 'get',
    params: query
  })
}
